﻿var prev_background;
function OnListViewItemMouseOver(ListViewItem)
{
    prev_background = ListViewItem.style.background;
    ListViewItem.style.background = "#aaaaaa";
    ListViewItem.style.color = "#ffffff";
}
function OnListViewItemMouseOut(ListViewItem)
{
    ListViewItem.style.background = prev_background;
    ListViewItem.style.color = "#000000";
}


var ControlsShowCount = new Array();
function ChangeViewStateControl(ControlId, CheckBox)
{
    var Control = document.getElementById(ControlId);  
    if (ControlsShowCount[ControlId] == null)  
    {
        ControlsShowCount[ControlId] = 0;
    }
    if (CheckBox.checked)
    {
        Control.style.visibility = "visible";
        Control.style.position = "relative"; 
        ControlsShowCount[ControlId] += 1;
    }
    else
    {
        ControlsShowCount[ControlId] -= 1;
        if (ControlsShowCount[ControlId] == 0)
        {
            Control.style.visibility = "hidden";
            Control.style.position = "absolute";
        }
    }            
}


function Show(elem)
{
    document.getElementById(elem).style.visibility = "visible";
}

function Hide(elem)
{
    document.getElementById(elem).style.visibility = "hidden";
}